package com.four.shop.service.impl;

import com.four.shop.dao.FormatDao;
import com.four.shop.entity.Format;
import com.four.shop.service.FormatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * @Author:wsy
 * @Date: 2021/12/9/15:35
 */
@Service
public class FormatServiceImpl implements FormatService {
    @Autowired
    private FormatDao formatDao;

    @Override
    public void formatadd(Format format) {
        int f=10;
        if(format.getFormName()!=null&&format.getFormName().length()<=f){
            formatDao.formatadd(format);
        }
    }

    @Override
    public Integer getById() {
        return   formatDao.getById();

    }



    @Override
    public void formatupdate(Format format) {

        formatDao.formatupdate(format);
    }

    @Override
    public void formatdel(int id) {
        formatDao.formatdel(id);
    }
}
